#include"calClient.hpp"
#include<memory>

using namespace client;
using namespace std;

static void Usage(string proc)
{
    cout << "\nUsage:\n\t" << proc << "  serverip serverport\n\n";
}


// tcp服务器，启动上跟udp server一模一样
// ./tcpCliennt serverip serverport
int main(int argc,char* argv[])
{
    if (argc != 3)
    {
        Usage(argv[0]);
        exit(1);
    }

    string serverip = argv[1];
    uint16_t severport = atoi(argv[2]);
    // string ip = argv[1];
    std::unique_ptr<CalClient> tcli (new CalClient(serverip,severport));

    tcli->initClient();
    tcli->start();
    return 0;
}